# 指定cmake的版本
cmake_minimum_required(VERSION 2.6)
# 项目名称

set (TARGET_NAME runDarknet)

add_definitions(-DOPENCV)

# 包含头文件目录
#set(OpenCV_INCLUDE_DIR /home/ubuntu/liudan/plate_test/XHLPR_MNN_centos_v6.3_20210707/include)
#set(LPR_INCLUDE_DIR /home/tarkelc/third-party/3rd_party/plate_detect/include)
#set(MNN_INCLUDE_DIR /home/ubuntu/liudan/plate_test/XHLPR_MNN_centos_v6.3_20210707/include)
#include_directories(. ${OpenCV_INCLUDE_DIR} ${LPR_INCLUDE_DIR} ${MNN_INCLUDE_DIR} /usr/include/freetype2/ /mnt/hgfs/cars/camera_test/SDK/)

#set(BOOST_INCLUDE_DIR /home/nvidia/liudan/3rdparty/boost/include)
#set(BOOST_INCLUDE_SUB_DIR /home/nvidia/liudan/3rdparty/boost/include/boost)
set(DARKNET_INCLUDE ./include)
include_directories(. ${DARKNET_INCLUDE})
# 源文件目录
aux_source_directory(./ DIR_SRCS)
# 用于链接的动态库
set(DARKNET_LIB /mnt/hgfs/cars/darknetRun)
#set(XHLPR_LIB_DIR /home/tarkelc/third-party/3rd_party/plate_detect/lib /mnt/hgfs/cars/camera_test/SDK)
link_directories(${DARKNET_LIB})

#find_package(OpenSSL REQUIRED)
#set(OPENSSL_INCLUDE_DIR /home/nvidia/liudan/3rdparty/openssl/include)
#set(OPENSSL_INCLUDE_SUB_DIR /home/nvidia/liudan/3rdparty/openssl/include/openssl)
#set(OPENSSL_LIB_DIR /home/nvidia/liudan/3rdparty/openssl/lib)

#include_directories(${OPENSSL_INCLUDE_DIR})
#link_directories(${OPENSSL_LIB_DIR})
#message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
#message("OpenSSL libraries: ${OPENSSL_LIBRARIES} ${OPENSSL_LIB_DIR}")	


set(LIBRARYS -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -lopencv_videoio -lpthread -ldarknet)
#编译可执行文件
add_executable(${TARGET_NAME} ${DIR_SRCS})
#add_library(${TARGET_NAME} SHARED ${DIR_SRCS})
#链接库
target_link_libraries(${TARGET_NAME} ${LIBRARYS})
